﻿-- =============================================
-- Script Template
-- =============================================
USE [IC.NET]
GO
CREATE TABLE #RowCounts(
noOfRows int)
GO
INSERT INTO #RowCounts
SELECT COUNT(*) AS [ROWS] FROM ExposureCategory UNION
SELECT COUNT(*) AS [ROWS] FROM ExposureCacheRole UNION
SELECT COUNT(*) AS [ROWS] FROM DETargetArea UNION
SELECT COUNT(*) AS [ROWS] FROM DESenderRole UNION
SELECT COUNT(*) AS [ROWS] FROM DERecipientRole UNION
SELECT COUNT(*) AS [ROWS] FROM DEKeyword UNION
SELECT COUNT(*) AS [ROWS] FROM DEExplicitAddress UNION
SELECT COUNT(*) AS [ROWS] FROM DEDistributionReference UNION
SELECT COUNT(*) AS [ROWS] FROM DEContentKeyword UNION
SELECT COUNT(*) AS [ROWS] FROM DEConsumerRole UNION
SELECT COUNT(*) AS [ROWS] FROM DEXMLContent UNION
SELECT COUNT(*) AS [ROWS] FROM DEOther UNION
SELECT COUNT(*) AS [ROWS] FROM DEOriginatorRole UNION
SELECT COUNT(*) AS [ROWS] FROM DENonXMLContent UNION
SELECT COUNT(*) AS [ROWS] FROM DEMain UNION
SELECT COUNT(*) AS [ROWS] FROM DEContentObject UNION
SELECT COUNT(*) AS [ROWS] FROM ExposureCache
GO
select SUM(noOfRows) AS Total
from #RowCounts
GO
DROP TABLE #RowCounts
GO